package top.lethelh.jianoa.exception;

import lombok.Data;

/**
 * @author lh 自定义异常类
 */
@Data
public class JoaException extends RuntimeException{
    private String msg;
    private int code = 500;

    public JoaException(String msg){
        super(msg);
        this.msg = msg;
    }

    public JoaException(String msg, Throwable e){
        super(msg, e);
        this.msg = msg;
    }

    public JoaException(String msg, int code){
        super(msg);
        this.msg = msg;
        this.code = code;
    }

    public JoaException(String msg, int code, Throwable e){
        super(msg, e);
        this.msg = msg;
        this.code = code;
    }
}
